package com.wanmait.test.service.impl;

import com.wanmait.test.mapper.ProductMapper;
import com.wanmait.test.pojo.Product;
import com.wanmait.test.service.ProductService;
import com.wanmait.test.util.Pager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**ProductServiceImpl class
 *
 * @author 王志斌
 * @date 2019-02-13
 * */
@Service
public class ProductServiceImpl implements ProductService {
    @Resource
    private ProductMapper productMapper;

    /**显示所有
     * @param pager
     * @return List<Product> findAllByPage
     * */
    @Override
    public List<Product> findAllByPage(Pager pager, Product product) {
        return productMapper.findAllByPage(pager, product);
    }

    /**获取商品总条数
     * @return Integer
     * */
    @Override
    public Integer dataCount(Product product) {
        return productMapper.dataCount(product);
    }
}
